package com.mycompany.app.hr.tna.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;


@Entity
@Table(name = "shift_pattern")
public class ShiftPattern {
    
    
    /**
     * shift pattern:Four on, four off 
     * 不同的pattern,决定不同shift code的人如何上班.更复杂的work shift model,
     * 可以设定更多的pattern来满足.
     * 目前pattern有4种, 可以满足2批员工7*24小时的生产并保持four on, four off.
     * @author Shawn.guo
     *
     */
//    public static enum Pattern {
//        _1day3night, _2day4night, _3day1night, _4day2night
//    }
    
    
    @Id
    @Column(name = "shift_pattern_id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private String id;
    
    @Column(name = "shift_pattern_name")
    private String shiftPatternName;
    
    @Enumerated(EnumType.STRING)
    @Column(name = "shift_pattern_desc")
    private String shiftPatternDesc;

    
 // =======================================================
    @Override
    public String toString() {

        return ToStringBuilder.reflectionToString(this);
    }
    // =======================================================


    public String getId() {
    
        return id;
    }


    public void setId(String id) {
    
        this.id = id;
    }


    public String getShiftPatternName() {
    
        return shiftPatternName;
    }


    public void setShiftPatternName(String shiftPatternName) {
    
        this.shiftPatternName = shiftPatternName;
    }


    public String getShiftPatternDesc() {
    
        return shiftPatternDesc;
    }


    public void setShiftPatternDesc(String shiftPatternDesc) {
    
        this.shiftPatternDesc = shiftPatternDesc;
    }
    
    
    
    
    
    
}
